//生产总览组件(测试阶段)
import React, { Component } from "react";
import { connect } from "dva";
import { List, Tabs } from "antd-mobile";
import { StickyContainer, Sticky } from "react-sticky";
import styles from "./Environmental.less";

import EnvDay from './tab/EnvDay';
import EnvHistory from './tab/EnvHistory';
import ddonfig from '../../ddconfig';
ddonfig.setTitle('环保指标报警')
//列表套件
const Item = List.Item;
const Brief = Item.Brief;

const tabs = [{ title: "当日报警" }, { title: "历史报警" }];

class Environmental extends Component {
    state = {};

    production = () => {
        console.log(1);
    };

    render() {
        return (
            <div>
                <div className={styles.wrap}>

                    <div className={styles.typearea}>
                        <StickyContainer
                         tabBarUnderlineStyle={{color:'red'}}
                         tabBarBackgroundColor="red"
                        >
                            <Tabs
                                tabs={tabs}
                                initalPage={"t2"}
                               className={styles.TabsB}
                            >
                              
                                    <EnvDay
                                     history ={this.props.history}
                                    />
                                  
                              
                             
                                <EnvHistory
                                 history ={this.props.history}
                                />
                             
                                  
                              
                            </Tabs>
                        </StickyContainer>
                    </div>
                </div>
            </div>
        );
    }
}
function mapStateToProps(state) {
    return {};
}
export default connect()(Environmental);
